package com.suixinsanren.algorithm.sort.bubble.demo03;

import org.junit.Test;

import java.util.Arrays;
import java.util.Random;

public class BubbleTestDrive {

    private static int[] arr = new int[10];
    private static Random random = new Random();

    public void init() {
        for (int i = 0; i < arr.length; i++) {
            arr[i] = random.nextInt(10);
        }
        System.out.println(Arrays.toString(arr));
    }

    @Test
    public void eachTest() {
        for (int i = 0; i < 100; i++) {
            init();
            BubbleSort03.sort(arr);
            printArr();
        }
    }

    public void printArr() {
        System.out.println(Arrays.toString(arr));
        System.out.println("-----------------");
    }

}
